package com.xinyuan.service;

import com.xinyuan.entity.FilePath;
import com.xinyuan.mapper.WorkHourMaper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**O
 * @Classname WorkHourService
 * @Description TODO
 * @Date 2020/5/25 17:27
 * @Created by zfl
 */
@Service
public class WorkHourService {
    @Autowired
    private WorkHourMaper workHourMaper;

    @Async
    public void insertWorkHour(double THRESHOL_FH,double THRESHOL_FC,double THRESHOL_MO,double INTERV_FH,double INTERV_FC,double INTERV_MO,String A_THRESHOL,String C_THRESHOL,String A_INTERV,String C_INTERV, String MTOP_THRESHOL,String MTOP_INTERV) {
        workHourMaper.insertWorkHour(THRESHOL_FH,THRESHOL_FC,THRESHOL_MO,INTERV_FH,INTERV_FC,INTERV_MO,A_THRESHOL,C_THRESHOL,A_INTERV,C_INTERV,MTOP_THRESHOL,MTOP_INTERV);
    }

    public int insertFilePath(String filePath,String fileID) {
        int result = workHourMaper.insertFilePath(filePath,fileID);
        return result;
    }

    /*public FilePath findByID(String fileID) {
        FilePath file = workHourMaper.findByFileID(fileID);
        return file;
    }*/
}
